﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PasswordProvider.View
{
    /// <summary>
    /// Interaction logic for MessageBox.xaml
    /// </summary>
    public sealed partial class MessageBox : Window
    {
        public MessageBox()
        {
            InitializeComponent();
        }        

        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);
            
            if (_okButton.IsDefault)
                _okButton.Focus();
            else if (_cancelButton.IsDefault)
                _cancelButton.Focus();

        }

        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            DragMove();
        }
    }
}
